package com.huixh.train.business.service;

import com.huixh.train.business.domain.DailyTrainSeat;
import com.huixh.train.business.req.DailyTrainSeatQueryReq;
import com.huixh.train.business.req.DailyTrainSeatSaveReq;
import com.huixh.train.business.resp.DailyTrainSeatQueryResp;
import com.huixh.train.common.resp.PageResult;

import java.util.Date;
import java.util.List;

/**
* @author huixh
*/
public interface DailyTrainSeatService {
    /**
    * 保存
    * @param  dailyTrainSeatSaveReq 保存参数
    */
    void save(DailyTrainSeatSaveReq dailyTrainSeatSaveReq);

    /**
    * 查询列表
    * @param dailyTrainSeatQueryReq 查询参数
    * @return list
    */
    PageResult <List<DailyTrainSeatQueryResp>> queryList(DailyTrainSeatQueryReq dailyTrainSeatQueryReq);
    /**
    * 删除
    * @param id id
    */
    void delete(Long id);

    /**
     * 生成每日车厢座位数据
     * @param trainCode 列车编号
     * @param date 时间
     */
    void genDailySeat(String trainCode, Date date);

    /**
     * 根据车厢索引查询
     * @param date 日期
     * @param trainCode 车次
     * @param carriageIndex 车厢索引
     * @return
     */
    List<DailyTrainSeat> selectByCarriage(Date date, String trainCode, Integer carriageIndex);

    Long countSeat(Date date, String trainCode);
}

